package com.boot2.core.dict;

public class WarningEnum {
	// 终端
	public static enum HAND_STATUS {
		UNHANDLED(0, "未处理"), HANDLING(1, "处理中"), HANDLED(2, "已处理");

		private int index;
		private String name;

		private HAND_STATUS(int index, String name) {
			this.index = index;
			this.name = name;
		}

		public static String getName(int index) {
			for (HAND_STATUS c : HAND_STATUS.values()) {
				if (c.getIndex() == index) {
					return c.name;
				}
			}
			return null;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public int getIndex() {
			return index;
		}

		public void setIndex(int index) {
			this.index = index;
		}
	}

	// 终端
	public static enum TYPE {
		TYPE_FAULT(0, "未处理"), TYPE_WARNING(1, "处理中");

		private int index;
		private String name;

		private TYPE(int index, String name) {
			this.index = index;
			this.name = name;
		}

		public static String getName(int index) {
			for (TYPE c : TYPE.values()) {
				if (c.getIndex() == index) {
					return c.name;
				}
			}
			return null;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public int getIndex() {
			return index;
		}

		public void setIndex(int index) {
			this.index = index;
		}
	}
}
